package com.ProvierAndCustoer;

/**
 * Created by 41579 on 2017/4/20.
 */
public class Productor<T extends IResource> implements IProductor {
    private IInventory<T> resources;

    public Productor(IInventory<T> resources) {
        this.resources = resources;
    }

    public IInventory<T> getResources() {
        return resources;
    }

    public void setResources(IInventory<T> resources) {
        this.resources = resources;
    }

    @Override
    public void product(IResource resource) {
        resources.add((T) resource);
    }
}
